﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv=Content-Type content="text/html;charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/admin/assets/css/layui.css">
    <link rel="stylesheet" href="/admin/assets/css/admin.css">
    <script src="/admin/assets/echarts.min.js"></script>
    <script src="/admin/assets/layui.js"></script>
    <script src="/admin/js/index.js" data-main="home"></script>
    <script src="/admin/home.js"/>
    <title>汽车商城管理员后台</title>
    <script src="/admin/qrcode/jquery2.1.4.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header custom-header">

        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item slide-sidebar" lay-unselect>
                <a href="javascript:;" class="icon-font"><i class="ai ai-menufold"></i></a>
            </li>
        </ul>

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a id="user" href="javascript:;"></a>
                <dl class="layui-nav-child">
                    <dd><a href="#">帮助中心</a></dd>
                    <dd><a id="logout" href="#">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side custom-admin">
        <div class="layui-side-scroll">

            <div class="custom-logo">
                <img src="/admin/assets/images/logo.gif" alt=""/>
                <h1>汽车商城</h1>
            </div>
            <ul id="Nav" class="layui-nav layui-nav-tree">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe68e;</i>
                        <em>主页</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="console.html"><i class="layui-icon">&#xe665;</i> 控制台</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe664;</i>
                        <em>汽车管理</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="courier/list.html"><i class="layui-icon">&#xe60a;</i> 车辆列表</a></dd>
                        <dd><a href="courier/autoList.html"><i class="layui-icon">&#xe60a;</i> 车辆品牌详情</a></dd>
                        <dd><a href="courier/add.html"><i class="layui-icon">&#xe654;</i> 添加车型</a></dd>
                        <dd><a href="courier/addAuto.html"><i class="layui-icon">&#xe654;</i> 添加车系</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe857;</i>
                        <em>4S店管理</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="express/list.html"><i class="layui-icon">&#xe60a;</i> 4S店列表</a></dd>
                        <dd><a href="express/add.html"><i class="layui-icon">&#xe654;</i> 添加店铺</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe770;</i>
                        <em>用户管理</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="user/list.html"><i class="layui-icon">&#xe60a;</i> 用户列表</a></dd>
                        <dd><a href="user/add.html"><i class="layui-icon">&#xe654;</i> 用户增加</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe857;</i>
                        <em>预约看车信息</em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="orders/list.html"><i class="layui-icon">&#xe60a;</i> 预约信息列表</a></dd>
                        <dd><a href="orders/add.html"><i class="layui-icon">&#xe654;</i> 添加预约信息</a></dd>
                    </dl>
                </li>
            </ul>

        </div>
    </div>

    <div class="layui-body">
        <div class="layui-tab app-container" lay-allowClose="true" lay-filter="tabs">
            <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
            <div id="appTabPage" class="layui-tab-content"></div>
        </div>
    </div>
    <div class="mobile-mask"></div>
</div>

<script>
    $(function(){
        $.ajax({
            type: "POST",
            url: "/Admin/user",
            data: "",
            dataType:"json",
            success: function(vo){
                $("#user").html(vo.user);
            }
        })
    })
    let logout = document.querySelector('#logout');
    logout.onclick = function () {
        $.ajax({
            type: "POST",
            url: "/Login/Logout",
            data: "",
            dataType: "json",
            success: function (vo) {
                if (vo.code === 200) {
                    location.assign("login.html")
                }
            }
        })
    }



</script>
</body>
</html>